How to Use the Basketball Database:

Summary:

This database application serves as a way to view information about players and teams currently apart of the National Basketball Association (NBA). Additionally, the current information can be updated or deleted, and new information can be added at any given point in time.

Using the Program:

Once you have launched the Basketball Database program, the first step to displaying the data you wish to see is to click the button at the top of the window that says "Lookup New Data". This will display a dialog that will allow you to choose what kind of information you want to display from the database.

Go through each area of the information selection and answer the questions that are asked there. If you do not answer all of the questions, an error message will be displayed and you will have to close it and fill in the missing information. The only exception to this is the last section where it asks about sorting. Sorting is completely optional.

Once you have selected the types of information you wish to see from the database, click the "OK" button at the bottom of the dialog. You will now see that the table has been refreshed with the information you selected. At this point you may add, edit, or delete information stored in the database or you may start over and look up some different information.

Adding Information:

There are three possible ways to add information to the database. Which option you choose is completely up to you, and the multiple methods are there for your ease of use.

    The options to add data are:
  1. Click the "Add Row" button at the bottom of the window.
  2. Right click on the table somewhere and then click "Add Row".
  3. Click the "Edit" Menu at the top of the screen, then click "Add Row" in the drop-down that appears.

The row will be added to the end of the table regardless of what is currently selected.

Once you use one of the above methods, a dialog will pop up and you will be able to enter in information to add to the database. Once all of the fields have been filled out, you can click the "Add" button, and it will add the information you typed in into the database. It's important to note that you must make sure you enter the right kind of information into the fields. For example, if you enter a name into the field asking for an age (which their age should be a number) the data you typed would be considered invalid. If this were to occur, an error message would display and you would have to go through and fix any invalid fields.

Editing Information:

There are three possible ways to edit information currently stored in the database. Which option you choose is completely up to you, and the multiple methods are there for your ease of use.

    The options to edit data are:
  1. Click the "Edit Row" button at the bottom of the window.
  2. Right click on the table somewhere and then click "Edit Row".
  3. Click the "Edit" Menu at the top of the screen, then click "Edit Row" in the drop-down that appears.

The row that will be edited is going to be whatever row you currently have selected in the table. If no rows are selected, nothing will happen when you follow one of the above methods.

Once you use one of the above methods, a dialog will pop up and you will be able to enter in information to edit in the database. Once all of the fields have been filled out, you can click the "Update" button, and it will update the information you typed in into the database. It's important to note that you must make sure you enter the right kind of information into the fields. For example, if you enter a name into the field asking for an age (which their age should be a number) the data you typed would be considered invalid. If this were to occur, an error message would display and you would have to go through and fix any invalid fields.

Deleting Information:

There are three possible ways to delete information currently stored in the database. Which option you choose is completely up to you, and the multiple methods are there for your ease of use.

    The options to delete data are:
  1. Click the "Delete Row" button at the bottom of the window.
  2. Right click on the table somewhere and then click "Delete Row".
  3. Click the "Edit" Menu at the top of the screen, then click "Delete Row" in the drop-down that appears.

The row that will be deleted is going to be whatever row you currently have selected in the table. If no rows are selected, the very last row (the one at the very bottom) will be deleted from the database.

You will notice that deleting data works slightly differently from editing and adding data, as there is nothing to update or add to the database. So once you choose one of the above methods, a confirmation box will appear asking if you are absolutely sure that you want to delete the data. It's important to note that if you click "Yes", the data will be deleted and you cannot undo it. It is gone forever (or until you add it back in)!

Resetting the Database:

If you mess up, you don't have to fear! You can reset the database back to its default values simply by going to the Edit Menu and then clicking on "Reset Entire Database". It's important to note though, that if you do click this option, any data that you may have added will be lost. This should only be used as a last resort when you have lost too much information to undo!

Admin Mode:

IMPORTANT NOTE: This feature is for advanced users ONLY. If you do not know how to use SQL commands, please do not attempt to use this feature!

For those advanced users wishing to access every little nook and cranny of the Basketball Database, you can enter in custom SQL Commands into the Admin Mode Panel. This feature is disabled by default, so to enable it, click on the Options Menu, then click the check box option that says "Show Admin Mode Panel".

As soon as you have done this, you will notice on the left-hand side of the window a text-box will have appeared. Here you can enter in your SQL Statement, then click "Submit Query" at the bottom left of the window, and the results of your query (if it's valid) will be displayed in the table. Please Note: Only SELECT Statements will work here (i.e. statements to display data).




Copyright © 2019, by Jeremy Fail and Megan Grisley. Some Rights Reserved. Please see the full MIT License for details.